function selectdz()
{
	var opt;
	var selectOptions=document.all.citys.options;
	var i;
	for(i=selectOptions.length-1;i>=0;i--)
	{
		document.all.citys.options.remove(i);
	}
	var selectOptions2=document.all.citys2.options;
	for(i=selectOptions2.length-1;i>=0;i--)
	{
		document.all.citys2.options.remove(i);
	}
	var province,city_name,city_code;
	var selectOptions3=document.all.province.options;
	for(i=selectOptions3.length-1;i>=0;i--)
	{
		if(document.all.province.options[i].selected==true)
		{
			province=document.all.province.options[i].text;
		}
	}
	for(i=1; i<citys[province].length; i++)
	{
		for(var key in citys[province][i])
		{
			city_name=citys[province][i][key][0]["cityname"];
			city_code=citys[province][i][key][0]["cityid"];
			opt = document.createElement("OPTION");
			opt.value = city_code;
			opt.text = city_name;
			document.getElementById("citys2").add(opt);
		}
	}
	for(var key in citys[province][1])
	{
		for(i=1; i<citys[province][1][key].length; i++)
		{
			city_name=citys[province][1][key][i]["cityname"];
			city_code=citys[province][1][key][i]["cityid"];
			opt = document.createElement("OPTION");
			opt.value = city_code;
			opt.text = city_name;
			document.getElementById("citys").add(opt);
		}
	}
}
function selectdz2()
{
	var opt;
	var selectOptions=document.all.citys.options;
	var i;
	for(i=selectOptions.length-1;i>=0;i--)
	{
		document.all.citys.options.remove(i);
	}
	var province,cityid,city_name,city_code;
	var selectOptions2=document.all.province.options;
	for(i=selectOptions2.length-1;i>=0;i--)
	{
		if(document.all.province.options[i].selected==true)
		{
			province=document.all.province.options[i].text;
		}
	}
	var selectOptions3=document.all.citys2.options;
	for(i=selectOptions3.length-1;i>=0;i--)
	{
		if(document.all.citys2.options[i].selected==true)
		{
			cityid=document.all.citys2.options[i].text;
		}
	}
	var city_name,city_code;
	for(i=1; i<citys[province].length; i++)
	{
		for(var key in citys[province][i])
		{
			city_name=citys[province][i][key][0]["cityname"];
			if(city_name==cityid)
			{
				for(var j=1; j<citys[province][i][key].length; j++)
				{
					city_name=citys[province][i][key][j]["cityname"];
					city_code=citys[province][i][key][j]["cityid"];
					opt = document.createElement("OPTION");
					opt.value = city_code;
					opt.text = city_name;
					document.getElementById("citys").add(opt);
				}
			}
		}
	}
}

function random(min,max){ return Math.floor(min+Math.random()*(max-min)); }
function getname($sex,$cy){
	 var $xingsg="赵钱孙李周吴郑王冯陈褚卫蒋沈韩杨朱秦尤许何吕施张孔曹严华金魏陶姜戚谢邹";
	 var $xings="赵钱孙李周吴郑王冯陈褚卫蒋沈韩杨朱秦尤许何吕施张孔曹严华金魏陶姜戚谢邹喻柏水窦章云苏潘葛奚范彭郎鲁韦昌马苗凤花方俞任袁柳邓鲍史唐费廉岑薛雷贺倪汤藤殷罗毕郝邬安常乐于时付皮卞齐康伍余元卜顾孟平黄和穆肖尹姚邵湛汪祁毛禹狄米贝明藏计伏成戴谈宋茅庞熊纪舒屈项祝董梁杜阮蓝闵席季麻强贾路娄危江童颜郭梅盛林刁钟徐邱骆高夏蔡田樊胡凌霍虞万支柯昝管卢莫经房裘缪干解应宗丁宣贲邓郁单杭洪包诸左石崔吉钮龚程嵇邢滑裴陆荣翁荀羊于惠甄曲家封芮羿储靳汲邴糜松井段富巫乌焦巴弓牧隗山谷车侯宓蓬全郗班仰秋仲伊宫宁仇栾暴甘钭厉戎祖武符刘景詹束龙叶幸司韶郜黎蓟薄印宿白怀蒲邰从鄂索咸籍赖卓蔺屠蒙池乔阴郁胥能苍双闻莘党翟谭贡劳逄姬申扶堵冉宰郦雍隙璩桑桂濮牛寿通边扈燕冀郏浦尚农温别庄晏柴瞿阎充慕连茹习宦艾鱼容向古易戈廖庾终暨居衡步都耿满弘匡文国寇广禄阙东欧殳沃利蔚越夔隆师巩厍聂晁勾敖融冷訾辛阚那简饶空曾毋沙乜养鞠须丰巢关相查后荆红游竺权盖益桓公";
	 var $mings="乾坤有序宇宙无疆星辰密布斗柄指航昼白夜黑日明月亮风驰雪舞电闪雷响云腾致雨结晨霜虹霓霞辉雾沉雹降春生夏长秋收冬藏时令应候寒来暑往远古洪荒海田沧桑陆地漂移板块碰撞山岳巍峨湖泊荡漾植被旷野岛撒汪洋冰川冻土沙漠沃木丰树森岩多滩广鸟飞走鳞潜羽翔境态和谐物种安详形分上下道合杳渺天体著彰凝气为能以场缩浓而质积微显量化巨幻虚恍惚成象强固凌柔亦制刚终极必反存兴趋色空轮回动静恒常唯实众名一理万方娘没齿难忘兄弟姐妹互访侄男闺少哺育茁壮夫妻相敬梦忆隔屋邻舍遇事谦谅伯公慈孝赡养尊朋礼友仁义君郎炎卧笛悠扬筝音奔奋唢呐高亢荆浩匡庐董源潇湘米芾写意悲鸿骏昂笔墨纸砚匾楣楹榜楷隶篆帖草狂敦煌石窟长城伟墙青铜甲缕衣纱裳虎符越剑陶马俑彩瓷宝瓮丝绸凡尔赛宫金字塔状泰姬彼得教堂自由女神希腊塑像最后晚创造亚当亭榭楼阁寺庙殿廊蓬门荜户丈室绿窗府弟别墅画栋雕梁庭院踏步影屏幕障承尘藻井篱笆柱桩舷舵扶靠凭栏眺望悬崖峭壁峰峦叠嶂泉喷岚罩湍瀑宕峡沟潭渊溪涧流淌池渠堰坝沼泽泥塘漩涡波礁屿连江涌澎湃惊涛骇浪溢汛潮浮涨苍松寿柏垂柳毛杨芭蕉蒲扇斑竹筐槐椿榆桦杉桂榕樟斋扉紧闭栅苑旁坪埔莱茵菲窥坞坊蔷薇翩跹莆菏蔚茫蕴蒂荚芯蓓蕾琳琅奇异卉荣秧兰荷菊梅四季芬芳杜鹃泣血芙蓉吉祥茉莉馥郁玫瑰刺芒瓜果蔬菜葱蒜韭姜茴椒芹葵皮芥辣酱芸苔芋笋葫芦瓢瓤番茄蘑菇乳蛋醇酿碘盐食醋脆卜甜糖珍馐旨甘肴馔膏粱葡萄美酒玉液琼浆咖啡益智茗茶顺肠桃李杏柿汁鲜味爽椰柚橙桔渴饮品尝菠萝柑橘橄榄槟榔梨枣苹楂荔栗榴鹦鹉学舌蜜蜂穿忙栖洞梧桐引凰牵振鸠鹏张鸥莺燕雀雏猩攀梢牡匿冈砂舟骆驼迅捷羚中华初繁狮渐醒玖久纪末千年始零宏业昌盛妙策递迎左右兼顾总统领内取稳进外交志同阶梯过度猛六七监视听戒效约宜行贬恶褒绩赏劝操执塞涓荧势如突起薪熄平途逢险兆消芽于萌调息止纷贵在用衡依法谋治官吏皆推贤荐材睹貌辨容纯朴宽厚侠烈尽忠耿直肃仪襟怀袒诚媚机敏慧颖懈怠懒惰拙碌庸昧糊涂偏才至聪羞涩拘束杰健悍雄恭谨畏惧缄默持重安翱遨邦褒奔彪秉灿岑辰晨成铖丞聪畅达巅鼎帆斐峰丰耿翰航灏恒泓淮欢辉晖嘉杰今瑾景炅煚举俊康慷恺逵立磊鎏懋楠祺琪赡晟盛圣胜曙涛韬腾通暾万玮炜曦爔熙僖熹湘骁逍潇筱勰鑫轩晅曜祎怿燚懿毅昳熠益赢优毓渊跃赟哲臻郅挚振忠锛餐憯穇舱糙蹅侪幨阊氅鋹谌踸赪褫憧瘳踹遄陲锤輴錞糍璁璀撮蹉鹾错锝雕锭辐钢锢锪辑锦静锯锩髹谖缜铮整锟铼钔锰穆锫凭錡钱锖嫱揿瘸蹂儒缛褥噻嬗膳鄃输蛳撕稣锬颓锡羲螅阋锨醒谒逾觎谕憎甑瘵战绉诸麈撞锥锱郰撙蓓荜筚蓖篦蔀篰苍橙篘莼笃饿谔鄂阏萼遏噩蒽篚噶篙糕缟膈鸪毂掼龟辊过蒿嚆横黉鲎桦慌隍荤机畿墼蒺剂冀髻颊缣蒹谏踺彊耩犟挢徼缙噤颈憬橘举踽窭鄄橛麇瞰眍篥蓄蓁蒸裤哙窥愦梦蒲朴器褰黔橇桥憔樵撬鞘亲擒檎螓檠磬遒鼽糗趋鸲磲桡蓉蓐穑树蒴蒜荪蓑蓊樨县橡筱啸谐阎谚窑缢荫萦蓥嬴颖阈遇圜樾筑篆嘴樽澳鲅办鲍虣惫糒甏嬖觱鮅遍辨瘭傧拨饽播鲌膊馞潺潮澈澄霏奋愤讽抚鲋骇颔翰翮醐寰遑潢讳阍馄涧浇洁噱溃潦涝霖蚂骂瞒螨醚悯瘼默谋霓凝潘螃耪陪霈澎膨骈蹁谝瓢瞟撇瞥频鲆扑氆潜润撒霎潸潲渑澍澌潭烫潼隈沩涠阌宪廨兴学浔鄅沄撤陈撑鸱炽俦辏达殚掸惮导道灯谛谍蹀都赌憝吨炖遁踱燔积撅獗琏撩獠燎璇臻赖褴螂捞擂缡璃罹历廪陵遛龙瘘卢陆录焖挠鲇哝诺逎燃烧燊遂鲐昙糖螗绦陶蹄醍头暾鸵橐熹晓谑焰鸯晔燚燠璋瘴踵猪撰赘谘髭嗳嫒谙聱螯懊磅壁碜惯衡垦垮磨瓯碛墙融坛违谓怃歙遐鸭阉燕噫颐峄殪阴壅馀豫鸳螈运郓酝砖";
	 var $nus="筠柔竹霭凝晓欢霄枫芸菲寒伊亚宜可姬舒影荔枝思丽秀娟英华慧巧美娜静淑惠珠翠雅芝玉萍红娥玲芬芳燕彩春菊勤珍贞莉兰凤洁梅琳素云莲真环雪荣爱妹霞香月莺媛艳瑞凡佳嘉琼桂娣叶璧璐娅琦晶妍茜秋珊莎锦黛青倩婷姣婉娴瑾颖露瑶怡婵雁蓓纨仪荷丹蓉眉君琴蕊薇菁梦岚苑婕馨瑗琰韵融园艺咏卿聪澜纯毓悦昭冰爽琬茗羽希宁欣飘育滢馥梦琪忆柳之桃慕青问兰尔岚元香初夏沛菡傲珊曼文乐菱痴珊恨玉惜文香寒新柔语蓉海安夜蓉涵柏水桃醉蓝春儿语琴从彤傲晴语兰又菱碧彤元霜怜梦紫寒妙彤曼易南莲紫翠雨寒易烟如萱若南寻真晓亦向珊慕灵以蕊寻雁映易雪柳孤岚笑霜海云凝天沛珊寒云冰旋宛儿绿真盼儿晓霜碧凡夏菡曼香若烟半梦雅绿冰蓝灵槐平安书翠翠风香巧代云梦曼幼翠友巧听寒梦柏醉易访旋亦玉凌萱访卉怀亦笑蓝春翠靖柏夜蕾冰夏梦松书雪乐枫念薇靖雁寻春恨山从寒忆香觅波静曼凡旋以亦念露芷蕾千兰新波代真新蕾雁玉冷卉紫山千琴恨天傲芙盼山怀蝶冰兰山柏翠萱恨松问旋从南白易问筠如霜半芹丹珍冰彤亦寒寒雁怜云寻文乐丹翠柔谷山之瑶冰露尔珍谷雪乐萱涵菡海莲傲蕾青槐冬儿易梦惜雪宛海之柔夏青亦瑶妙菡春竹痴梦紫蓝晓巧幻柏元风冰枫访蕊南春芷蕊凡蕾凡柔安蕾天荷含玉书兰雅琴书瑶春雁从安夏槐念芹怀萍代曼幻珊谷丝秋翠白晴海露代荷含玉书蕾听白访琴灵雁秋春雪青乐瑶含烟涵双平蝶雅蕊傲之灵薇绿春含蕾从梦从蓉初丹听兰听蓉语芙夏彤凌瑶忆翠幻灵怜菡紫南依珊妙竹访烟怜蕾映寒友绿冰萍惜霜凌香芷蕾雁卉迎梦元柏代萱紫真千青凌寒紫安寒安怀蕊秋荷涵雁以山凡梅盼曼翠彤谷冬新巧冷安千萍冰烟雅阳友绿南松诗云飞风寄灵书芹幼蓉以蓝笑寒忆寒秋烟芷巧水香映之醉波幻莲夜山芷卉向彤小玉幼南凡梦尔曼念波迎松青寒笑天涵蕾碧菡映秋盼烟忆山以寒寒香小凡代亦梦露映波友蕊寄凡怜蕾雁枫水绿曼荷笑珊寒珊谷南慕儿夏岚友儿小萱紫青妙菱冬寒曼柔语蝶青筠夜安觅海问安晓槐雅山访云翠容寒凡晓绿以菱冬云含玉访枫含卉夜白冷安灵竹醉薇元珊幻波盼夏元瑶迎曼水云访琴谷波乐之笑白之山妙海紫霜平夏凌旋孤丝怜寒向萍凡松青丝翠安如天凌雪绮菱代云南莲寻南春文香薇冬灵凌珍采绿天春沛文紫槐幻柏采文春梅雪旋盼海映梦安雁映容凝阳访风天亦平绿盼香觅风小霜雪萍半雪山柳谷雪靖易白薇梦菡飞绿如波又晴友易香菱冬亦问雁妙春海冬半安平春幼柏秋灵凝芙念烟白山从灵尔芙迎蓉念寒翠绿翠芙靖儿妙柏千凝小珍天巧妙旋雪枫夏菡元绿痴灵绮琴雨双听枫觅荷凡之晓凡雅彤香薇孤风从安绮彤之玉雨珍幻丝代梅香波青亦元菱海瑶飞槐听露梦岚幻竹新冬盼翠谷云忆霜水瑶慕晴秋双雨真觅珍丹雪从阳元枫痴香思天如松妙晴谷秋妙松晓夏香柏巧绿宛筠碧琴盼兰小夏安容青曼千儿香春寻双涵瑶冷梅秋柔思菱醉波醉柳以寒迎夏向雪香莲以丹依凝如柏雁菱凝竹宛白初柔南蕾书萱梦槐香芹南琴绿海沛儿晓瑶听春凝蝶紫雪念双念真曼寒凡霜飞雪雪兰雅霜从蓉冷雪靖巧翠丝觅翠凡白乐蓉迎波丹烟梦旋书双念桃夜天海桃青香恨风安筠觅柔初南秋蝶千易安露诗蕊山雁友菱香露晓兰白卉语山冷珍秋翠夏柳如之忆南书易翠桃寄瑶如曼问柳香梅幻桃又菡春绿醉蝶亦绿诗珊听芹新之易巧念云晓灵静枫夏蓉如南幼丝秋白冰安秋白南风醉山初彤凝海紫文凌晴香卉雅琴傲安傲之初蝶寻桃代芹诗霜春柏绿夏碧灵诗柳夏柳采白慕梅乐安冬菱紫安宛凝雨雪易真安荷静竹代柔丹秋绮梅依白凝荷幼珊忆彤凌青之桃芷荷听荷代玉念珍梦菲夜春千秋白秋谷菱飞松初瑶惜灵恨瑶梦易新瑶曼梅碧曼友瑶雨兰夜柳香蝶盼巧芷珍香卉含芙夜云依萱凝雁以莲易容元柳安南幼晴尔琴飞阳白凡沛萍雪瑶向卉采文乐珍寒荷觅双白桃安卉迎曼盼雁乐松涵山恨寒问枫以柳含海秋春翠曼忆梅涵柳梦香海蓝晓曼代珊春冬恨荷忆丹静芙绮兰梦安紫丝千雁凝珍香萱梦容冷雁飞柏天真翠琴寄真秋荷代珊初雪雅柏怜容如风南露紫易冰凡海雪语蓉碧玉翠岚语风盼丹痴旋凝梦从雪白枫傲云白梅念露慕凝雅柔盼柳半青从霜怀柔怜晴夜蓉代双以南若菱芷文寄春南晴恨之梦寒初翠灵波巧春问夏凌春惜海亦旋沛芹幼萱白凝初露迎海绮玉凌香寻芹秋柳尔白映真含雁寒松友珊寻雪忆柏秋柏巧风恨蝶青烟问蕊灵阳春枫又儿雪巧丹萱凡双孤萍紫菱寻凝傲柏傲儿友容灵枫尔丝曼凝若蕊问丝思枫水卉问梅念寒诗双翠霜夜香寒蕾凡阳冷玉平彤语薇幻珊紫夏凌波芷蝶丹南之双凡波思雁白莲从菡如容采柳沛岚惜儿夜玉水儿半凡语海听莲幻枫念柏冰珍思山凝蕊天玉问香思萱向梦笑南夏旋之槐元灵以彤采萱巧曼绿兰平蓝问萍绿蓉靖柏迎蕾碧曼思卉白柏妙菡怜阳雨柏雁菡梦之又莲乐荷寒天凝琴书南映天白梦初瑶恨竹平露含巧慕蕊半莲醉卉天菱青雪雅旋巧荷飞丹恨云若灵";
	 if($sex != 1){$mings=$nus;}
	 var $xings_length=$xings.length-1;
	 var $sr=random(0,$xings_length);
	 var $xing=$xings.charAt($sr);
	 if($cy==1){
       $sr=random(0,$xingsg.length-1);
       $xing=$xingsg.charAt($sr);
    }
	var $mings_length=$mings.length-1;
    $mr=random(0,$mings_length);
    $ming1=$mings.charAt($mr);
    $mr=random(0,$mings_length);
    $ming2=$mings.charAt($mr);
    return $xing+$ming1+$ming2;
}

function createSFZ()
{
	var citystr1="",citystr2="",citystr3="";
	for(i=document.all.province.options.length-1;i>=0;i--)
	{
		if(document.all.province.options[i].selected==true)
		{
			citystr1=document.all.province.options[i].text;
		}
	}
	for(i=document.all.citys2.options.length-1;i>=0;i--)
	{
		if(document.all.citys2.options[i].selected==true)
		{
			citystr2=document.all.citys2.options[i].text;
		}
	}
	for(i=document.all.citys.options.length-1;i>=0;i--)
	{
		if(document.all.citys.options[i].selected==true)
		{
			citystr3=document.all.citys.options[i].text;
		}
	}
	var citystr="";
	if(citystr1!="")
	{
		citystr+=(citystr!="")?" "+citystr1:citystr1;
	}
	if(citystr2!="")
	{
		citystr+=(citystr!="")?" "+citystr2:citystr2;
	}
	if(citystr3!="")
	{
		citystr+=(citystr!="")?" "+citystr3:citystr3;
	}
	
	var baseArray=new Array(7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2);
	var reArray=new Array('1','0','X','9','8','7','6','5','4','3','2');
	var strArray1=new Array(1,3,5,7);
	var strArray2=new Array(2,4,6,8);
	var resultArray=new Array();
	
	var i,cityid="110000",ok=1;
	var selectOptions=document.all.citys.options;
	for(i=selectOptions.length-1;i>=0;i--)
	{
		if(document.all.citys.options[i].selected==true)
		{
			cityid=document.all.citys.options[i].value;
			ok=0;
		}
	}
	if(ok)
	{
		var selectOptions2=document.all.citys2.options;
		for(i=selectOptions2.length-1;i>=0;i--)
		{
			if(document.all.citys2.options[i].selected==true)
			{
				cityid=document.all.citys2.options[i].value;
				ok=0;
			}
		}
	}
	if(ok)
	{
		var selectOptions3=document.all.province.options;
		for(i=selectOptions3.length-1;i>=0;i--)
		{
			if(document.all.province.options[i].selected==true)
			{
				cityid=document.all.province.options[i].value;
			}
		}
	}
	if(cityid=="")
	{
		cityid='110101';
		citystr='北京市 市辖区 东城区(默认的，请选择地址！)';
		//alert("请先选择地址！");
		//return;
	}
	
	var years="1980",months="01",days="01";
	var selectOptions4=document.all.years.options;
	for(i=selectOptions4.length-1;i>=0;i--)
	{
		if(document.all.years.options[i].selected==true)
		{
			years=document.all.years.options[i].value;
		}
	}
	var selectOptions5=document.all.months.options;
	for(i=selectOptions5.length-1;i>=0;i--)
	{
		if(document.all.months.options[i].selected==true)
		{
			months=document.all.months.options[i].value;
			if(months<10) months="0"+String(months)
		}
	}
	var selectOptions6=document.all.days.options;
	for(i=selectOptions6.length-1;i>=0;i--)
	{
		if(document.all.days.options[i].selected==true)
		{
			days=document.all.days.options[i].value;
			if(days<10) days="0"+String(days)
		}
	}
	var nums=1;
	var selectOptions7=document.all.nums.options;
	for(i=selectOptions7.length-1;i>=0;i--)
	{
		if(document.all.nums.options[i].selected==true)
		{
			nums=document.all.nums.options[i].value;
		}
	}
	var sex;
	var sexs = document.getElementsByName("sexs");
	for(var i=0;i<sexs.length;i++)
	{
		if(sexs[i].checked==true) sex=sexs[i].value;
	}
	var sexstr=(sex==1)?"男":"女";
	var str="",str1="",str2="",str3,result,isok;
	str=String(cityid)+String(years)+String(months)+String(days);
	var m;
	for(m=0;m<nums;)
	{
		str3="";
		str1=String(parseInt(Math.random()*3))+String(parseInt(Math.random()*10));
		if(sex==1)
		{
			str2=String(strArray1[parseInt(Math.random()*4)]);
		}
		else
		{
			str2=String(strArray2[parseInt(Math.random()*4)]);
		}
		str3=str+str1+str2;
		result=0;
		for(var i=0;i<17;i++)
		{
			result=result+parseInt(str3.substr(i,1))*baseArray[i];
		}
		result %= 11;
		str3=str3+reArray[result];
		isok=1;
		for(var k=0;k<resultArray.length;k++)
		{
			if(resultArray[k]==str3)
			{
				isok=0;
				break;
			}
		}
		if(isok)
		{
			resultArray[m]=str3;
			m++;
		}
	}
	str="";
	for(var i=0;i<resultArray.length;i++)
	{
		str=str+"<li><div>姓　　名： "+getname(sex,0)+"</div> <div>性　　别： "+sexstr+"</div><div>出生日期： "+years+"年"+months+"月"+days+"日</div><div>发 证 地： "+citystr+"</div><div>身份证号： "+resultArray[i]+"</div></li>";
	}
	document.getElementById('showSFZ').style.display="block";
	document.getElementById("showSFZ").innerHTML=str;
}

function showprovinces()
{
	var opt;
	var provinces_name,provinces_code;
	for(var i=0; i<provinces.length; i++) 
	{
		provinces_name=provinces[i];
		provinces_code=citys[provinces_name][0]["cityid"];
		opt = document.createElement("OPTION");
		opt.value = provinces_code;
		opt.text = provinces_name;
		document.getElementById("province").add(opt);
	}
}
function showdate()
{
	var opt;
	var i;
	for(i=1980; i<2014; i++)
	{
		opt = document.createElement("OPTION");
		opt.value = i;
		opt.text = i;
		document.getElementById("years").add(opt);
	}
	for(i=1; i<13; i++)
	{
		opt = document.createElement("OPTION");
		opt.value = i;
		opt.text = i;
		document.getElementById("months").add(opt);
	}
	for(i=1; i<32; i++)
	{
		opt = document.createElement("OPTION");
		opt.value = i;
		opt.text = i;
		document.getElementById("days").add(opt);
	}
}
function showsex()
{
	var sexs = document.getElementsByName("sexs");
	for(var i=0;i<sexs.length;i++)
	{
		sexs[i].checked=(sexs[i].value==1)?true:false;
	}
}
function shownum()
{
	var opt;
	var i;
	for(i=1; i<21; i++)
	{
		opt = document.createElement("OPTION");
		opt.value = i;
		opt.text = i;
		document.getElementById("nums").add(opt);
	}
}

window.onload=function(){
	
	showprovinces();
	showdate();
	showsex();
	shownum();
}